package movie.test.login;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

public class AuthInterceptor extends HandlerInterceptorAdapter {
	
	@Autowired
	private HttpSession session;
	
	public boolean preHandle(HttpServletRequest request,  
            HttpServletResponse response, Object handler) throws Exception {
	System.out.println("这是我的拦截器");
	System.out.println("得到路径"+request.getRequestURI());
		String url = "http://localhost:8080/movie.web/view/main/main.html";
		/*response.sendRedirect(url);*/
		request.getRequestDispatcher("/NewFile.html").forward(request, response);
		return false;
	}

}
